package com.taiyuan.zfmvp.controller.testThread;

/**
 * @param request
 * @Author: zhoufang@si-tech.com.cn
 * @Descriiption:
 * @Date 2022/3/12
 * @return
 */
public class ThreadStateTest {

    public static void main(String[] args) {
        //--------------线程状态new开始---------------
        /*Thread th = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getId()+"正在运行");
            }
        });
        System.out.println(th.getName()+"---"+th.getState());
        System.out.println(Thread.currentThread().getId());*/
        //--------------线程状态new结束---------------

        //线程状态runnable开始
        /*Thread th = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName()+"状态"+Thread.currentThread().getState());
                System.out.println(Thread.currentThread().getName()+"开始执行");
                System.out.println(Thread.currentThread().getName()+"状态"+Thread.currentThread().getState());
            }
        });
        System.out.println(th.getName()+"状态"+th.getState());
        th.start();
        System.out.println("主线程"+Thread.currentThread().getName()+"状态"+Thread.currentThread().getState());*/
        //线程状态runnable结束

        //线程waiting开始


        //线程waiting结束

    }
}
